"""
类的多继承
"""


class Phone:
    IMEI = None  # 序列号
    producer = 'JAG10'  # 厂商

    def call_by_4g(self):
        print(F'Phone_4g通话_{self.producer}')


class NFCReader:
    producer = 'JAG20'

    def nfc_read(self):
        print(F'nfc读卡_{self.producer}')

    def nfc_write(self):
        print(F'nfc写卡_{self.producer}')

    def foo(self):
        print(F'NFCReader_foo_{self.producer}')


class RemoteControl:
    rc_type = '红外遥控'

    def control(self):
        print(F'开启远程控制_{self.rc_type}')

    def foo(self):
        print(F'RemoteControl_foo_{self.rc_type}')


"""
多继承的时候有同名的属性和方法的时候，优先级从左到右
"""


class JagochanPhone(Phone, NFCReader, RemoteControl):
    pass


jagochan_phone = JagochanPhone()
jagochan_phone.call_by_4g()
jagochan_phone.nfc_write()
jagochan_phone.control()
print(jagochan_phone.producer)  # JAG10
jagochan_phone.foo()
